package com.study.demo;

import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.engine.impl.persistence.entity.HistoricActivityInstanceEntityManager;

public class DeleteHisActivitiesCmd implements Command<Void> {
	
	private String   historicProcessInstanceId ;
	
	public DeleteHisActivitiesCmd(String  historicProcessInstanceId ) {
		this.historicProcessInstanceId = historicProcessInstanceId;
	}


	public Void execute(CommandContext commandContext) {
		HistoricActivityInstanceEntityManager haie= org.flowable.engine.impl.util.CommandContextUtil.getHistoricActivityInstanceEntityManager(commandContext);
		haie.deleteHistoricActivityInstancesByProcessInstanceId(historicProcessInstanceId);
		return null;
	}

}
